]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: fix math for translations when sliding in
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 18 Feb 2013 06:24:40 +0000 (01:24 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 18 Feb 2013 14:34:06 +0000 (09:34 -0500)
The math to compute translations was wrong when sliding in; also, don't
depend on the slide value for the translation anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=694064

js/ui/overviewControls.js

index f1e06873a9a6f8f974f9bc0a6112c2c53efd679e..f96502029be214146d8200ee66fbfda812138a69 100644 (file)
@@ -125,14 +125,12 @@ const SlidingControl = new Lang.Class({
     _getTranslation: function() {
         let child = this.actor.get_first_child();
         let direction = getRtlSlideDirection(this.layout.slideDirection, child);
-
-        let slide = this.getSlide();
         let visibleWidth = this.getVisibleWidth();
 
         if (direction == SlideDirection.LEFT)
-            return ((slide - 1) * visibleWidth);
+            return - visibleWidth;
         else
-            return ((1 - slide) * visibleWidth);
+            return visibleWidth;
     },
 
     _updateTranslation: function(slidingIn) {